#include <ins_info.h>

int main()
{

    for (int i = 0; i < 0x100; i++)
    {
        char *name = get_mnemonic(i, false);
        printf("0x%x %s ", i, name);
        struct Operand *ops = get_operands(i, false);
        while (ops != NULL)
        {
            printf("%s ", ops->name);
            printf("%d ", ops->immediate);
            printf("%d ", ops->increment);
            printf("%d ", ops->decrement);
            printf("%d ", ops->bytes);
            ops = ops->next;
        }
        printf("\n");

        free(name);
    }
    for (int i = 0; i < 0x100; i++)
    {
        char *name = get_mnemonic(i, true);
        printf("0x%x %s ", i, name);
        struct Operand *ops = get_operands(i, true);
        while (ops != NULL)
        {
            printf("%s ", ops->name);
            printf("%d ", ops->immediate);
            printf("%d ", ops->increment);
            printf("%d ", ops->decrement);
            printf("%d ", ops->bytes);

            ops = ops->next;
        }
        printf("\n");

        free(name);
    }
    return 0;
}